package com.dailyblue.java.project.power.mapper;

import com.dailyblue.java.project.power.bean.Powers;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RolesMapper {
    @Select("select count(id) from powers where url=#{url} and id in (select pid from role_power where rid =#{rid})")
    int checkRoleHasPermission(@Param("rid") int rid,@Param("url") String url);
}
